<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 主页示例</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/admin/css/pager.css">
    <!--轮播效果CSS-->
    <!--<link rel="stylesheet" href="__PUBLIC__/admin/static/css/demo.css"/>-->

</head>
<style>
    .dd {
        font-size: 20px;
        font-weight: bold;
        margin-top: 10px;
    }
</style>
<body class="gray-bg" onload="notice(1)">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title" style="border-bottom:none;background:#fff;">
                    <h5>工作台</h5>
                </div>

                <div class="row">

                    <div class="col-sm-12" style="padding-left: 40px">
                        <div class="row row-sm text-center">
                            <div class="col-xs-3">
                                <div class="panel padder-v item  bg-info" style="background-color:#00bdcc">
                                    <div class="h1 text-fff font-thin h1" style="color:white"><{$data.wait_check}></div>
                                    <span class="text-muted text-xs dd" style="color:white">待审用户数</span>
                                    <div class="top text-right w-full">
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-3">
                                <div class="panel padder-v item bg-info" style="background-color: #1fbba6">
                                    <div class="h1 text-fff font-thin h1" style="color:white">
                                        <{$data.wait_certificate}>
                                    </div>
                                    <span class="text-muted text-xs dd" style="color:white">待确认凭证数</span>
                                    <div class="top text-right w-full">
                                    </div>
                                </div>
                            </div>

                            <div class="col-xs-3">
                                <div class="panel padder-v item  bg-info" style="background-color: #5f8295">
                                    <div class="h1 text-fff font-thin h1" style="color:white">
                                        <{$data.wait_for_feedback}>
                                    </div>
                                    <span class="text-muted text-xs dd" style="color:white">用户反馈待处理数</span>
                                    <div class="top text-right w-full">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row" style="margin-right:0">
                <div class="col-sm-12" style="padding-right:0;">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title" style="border-bottom:none;background:#fff;">
                            <h5>通知公告</h5>
                        </div>
                        <div class="ibox-content">
                            <table class="table table-striped  table-hover">
                                <tbody>
                                <tr>
                                    <th width="85%">发布内容</th>
                                    <th width="15%">发布时间</th>
                                </tr>
                                </tbody>
                                <tbody id="notice_list">

                                </tbody>
                            </table>
                        </div>
                        <div id="pageone" style="width: 1200px;text-align: center;margin: 10px auto 0">
                            <ul class="pagination" id="page1"></ul>
                            <div class="pageJump">
                                <span>跳转到</span>
                                <input type="text"/>
                                <span>页</span>

                                <button type="button" class="button"></button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<!--轮播效果js-->
<!--<script src="__PUBLIC__/admin/static/js/rollSlide.js"></script>-->
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/admin/js/pager.js"></script>
<!-- 自定义js -->
<script src="__PUBLIC__/admin/js/content.js"></script>
<!--flotdemo-->
<script type="text/javascript">

    //公告详情
    function see_notice(obj,id,type) {
        window.location.href="__MODULE__/Index/notice_details?id="+id;


    }
    //公告
    function notice(page) {
        $.post('__MODULE__/Index/notice', {page: page}, function (data) {
            console.log('123213', data);
            if (data.code == '1001') {
                var obj = data.result;
                var len = obj.length;
                if (data.count <= 12) {
                    $('#pageone').hide();
                } else {
                    $('#pageone').show();
                }
                Page({
                    num: data.tol,					//页码数
                    startnum: page,				//指定页码
                    elem: $('#page1'),		//指定的元素
                    callback: function (n) {	//回调函数
                        notice(n);
                    }
                });
                var s = "";
                for (var i = 0; i < len; i++) {
                    s += "   <tr style='padding: 10px ;font-size: 14px;height: 40px'><td><a class='notice_content' href='javascript:void(0);' onclick='see_notice(this,"+obj[i].id+",1)' style='color: #676a6c;'>" + obj[i].title + "</a></td> <td>" + obj[i].ctime + "</td>   </tr>";
//                    s+="<tr><td colspan='9'><div class='' style='display:none; width: 100%'  id='notice"+obj[i].id+"'> " +
//                        "<span style='text-overflow: nowrap ;display:block; '>公告详情: "+obj[i].detail+"</span>" +
//                        " </div></td></tr>";
                }

                document.getElementById("notice_list").innerHTML = s;

            } else {

            }

        });


    }


</script>
</body>

</html>
